//
//  SEGEditAdressViewCell.m
//  ExcellentHome
//
//  Created by 刘山 on 16/11/19.
//  Copyright © 2016年 陈区. All rights reserved.
//

#import "SEGEditAdressViewCell.h"

@implementation SEGEditAdressViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupUI];
    }
    return self;
}
- (void)setupUI
{
    self.selectionStyle = UITableViewCellSelectionStyleNone;

    [self.contentView addSubview:self.ContentLabel];
    [self.ContentLabel setFont:[UIFont systemFontOfSize:16]];
    [self.ContentLabel setTextColor:kColor_1];

    [self.contentView addSubview:self.ContentLabel1];
    [self.ContentLabel1 setFont:[UIFont systemFontOfSize:16]];
    [self.ContentLabel1 setTextColor:kColor_1];

    [self.contentView addSubview:self.ContentLabel2];
    [self.ContentLabel2 setFont:[UIFont systemFontOfSize:13]];
    [self.ContentLabel2 setTextColor:kColor_2];
    self.ContentLabel2.numberOfLines = 0;

    // 默认标签
    [self.contentView addSubview:self.ContentLabel3];
    [self.ContentLabel3 setFont:[UIFont systemFontOfSize:13]];
    [self.ContentLabel3 setTextColor:kColor_T];
    self.ContentLabel3.layer.cornerRadius = 2;
    self.ContentLabel3.layer.masksToBounds = YES;
    self.ContentLabel3.layer.borderColor = kColor_T.CGColor;
    self.ContentLabel3.layer.borderWidth = 0.5;
    [self.ContentLabel3 setHidden:YES];
    self.ContentLabel3.text = @" 默认 ";

    [self.contentView addSubview:self.lineView];
    [self.lineView setBackgroundColor:kColor_L2];

    [self.contentView addSubview:self.ContentBtn];
    [self.ContentBtn setImage:[UIImage imageWithContentsOfFile:SEGPicName(@"btn_list_select_nor")] forState:UIControlStateNormal];
    [self.ContentBtn setImage:[UIImage imageWithContentsOfFile:SEGPicName(@"btn_list_select")] forState:UIControlStateSelected];
    [self.ContentBtn setTitle:@"设为默认" forState:UIControlStateNormal];
    [self.ContentBtn.titleLabel setFont:[UIFont systemFontOfSize:13]];
    [self.ContentBtn setTitleColor:kColor_3 forState:UIControlStateNormal];
    [self.ContentBtn setTitleEdgeInsets:UIEdgeInsetsMake(0, 5, 0, -5)];

    [self.contentView addSubview:self.ContentBtn1];
    [self.ContentBtn1.titleLabel setFont:[UIFont systemFontOfSize:13]];
    [self.ContentBtn1 setTitleColor:kColor_3 forState:UIControlStateNormal];
    [self.ContentBtn1 setTitleEdgeInsets:UIEdgeInsetsMake(0, 5, 0, -5)];

    [self.contentView addSubview:self.ContentBtn2];
    [self.ContentBtn2 setImage:[UIImage imageWithContentsOfFile:SEGPicName(@"icon_list_garbage")] forState:UIControlStateNormal];
    [self.ContentBtn2 setTitle:@"删除" forState:UIControlStateNormal];
    [self.ContentBtn2.titleLabel setFont:[UIFont systemFontOfSize:13]];
    [self.ContentBtn2 setTitleColor:kColor_3 forState:UIControlStateNormal];
    [self.ContentBtn2 setTitleEdgeInsets:UIEdgeInsetsMake(0, 5, 0, -5)];

    [self.ContentBtn addTarget:self action:@selector(setNormalAddressClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.ContentBtn1 addTarget:self action:@selector(setEditAddressClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.ContentBtn2 addTarget:self action:@selector(setDeleteAddressClick:) forControlEvents:UIControlEventTouchUpInside];

    [self remakeConstrants_NO];
}

- (void)setNormalAddressClick:(UIButton*)sender
{
    [self.adressDelegate adress_setNormalAddressClick:sender IndexPath:self.indexPath];
}

- (void)setEditAddressClick:(UIButton*)sender
{
    [self.adressDelegate adress_setEditAddressClick:sender IndexPath:self.indexPath];
}

- (void)setDeleteAddressClick:(UIButton*)sender
{
    [self.adressDelegate adress_setDeleteAddressClick:sender IndexPath:self.indexPath];
}

- (void)setShowType:(SEGEditAdressViewCellShowType)showType
{
    switch (showType) {
    case SEGEditAdressViewCellShowType_NO: {
        [self remakeConstrants_NO];
    } break;
    case SEGEditAdressViewCellShowType_Order_No: {
        [self remakeConstrants_Order_No];
    } break;
    case SEGEditAdressViewCellShowType_Order_Normal: {
        [self remakeConstrants_Order_Normal];
    } break;
    case SEGEditAdressViewCellShowType_Order_Selected: {
        [self remakeConstrants_Order_Selected];
    } break;
    case SEGEditAdressViewCellShowType_Order_SelectedNomal: {
        [self remakeConstrants_Order_SelectedNomal];
    } break;
    default: {
        [self remakeConstrants_NO];
    } break;
    }
}

- (void)remakeConstrants_NO
{
    [self.ContentLabel3 setHidden:YES];


    [self.ContentLabel sizeToFit];
    [self.ContentLabel mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.top.equalTo(self.contentView).mas_offset(15);
        make.width.mas_greaterThanOrEqualTo(0);
    }];

    [self.ContentLabel1 sizeToFit];
    [self.ContentLabel1 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.ContentLabel.mas_right).mas_offset(50);
        make.centerY.equalTo(self.ContentLabel);
    }];

    [self.ContentLabel2 sizeToFit];
    [self.ContentLabel2 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.contentView).mas_offset(15);
        make.right.equalTo(self.contentView).mas_offset(-15);
        make.top.equalTo(self.ContentLabel.mas_bottom).mas_offset(15).priorityHigh();
    }];

    [self.lineView mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.contentView).mas_offset(15);
        make.right.equalTo(self.contentView).mas_offset(-15);
        make.top.equalTo(self.ContentLabel2.mas_bottom).mas_offset(15).priorityHigh();
        make.height.mas_equalTo(0.5).priorityHigh();
    }];

    [self.ContentBtn sizeToFit];
    [self.ContentBtn mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.contentView).mas_offset(15);
        make.top.equalTo(self.lineView.mas_bottom).mas_offset(12.5).priorityHigh();
        // iOS10 以上的适配
        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0) {
            make.bottom.equalTo(self.contentView).mas_offset(-12.5);
        }
    }];

    [self.ContentBtn1 sizeToFit];
    [self.ContentBtn1 setImage:[UIImage imageWithContentsOfFile:SEGPicName(@"icon_list_edit")] forState:UIControlStateNormal];
    [self.ContentBtn1 setTitle:@"编辑" forState:UIControlStateNormal];
    [self.ContentBtn1 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.right.equalTo(self.ContentBtn2.mas_left).mas_offset(-20);
        make.centerY.equalTo(self.ContentBtn);
    }];

    [self.ContentBtn2 sizeToFit];
    [self.ContentBtn2 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.right.equalTo(self.contentView).mas_offset(-20);
        make.centerY.equalTo(self.ContentBtn);
    }];

    //SAM:iOS10兼容-cell
    [self.contentView mas_remakeConstraints:^(MASConstraintMaker* make) {
        // iOS10 以上的适配
        if ([[[UIDevice currentDevice] systemVersion] floatValue] < 10.0) {
            make.left.top.right.equalTo(self);
            make.bottom.equalTo(self.ContentBtn.mas_bottom).mas_offset(12.5);
        }else{
            make.edges.equalTo(self);
        }
        
    }];
}

- (void)remakeConstrants_Order_No
{

    [self.ContentBtn setHidden:YES];
    [self.ContentBtn2 setHidden:YES];

    [self.ContentLabel setHidden:NO];
    [self.ContentLabel1 setHidden:NO];
    [self.ContentLabel2 setHidden:NO];
    [self.lineView setHidden:NO];
    [self.ContentBtn1 setHidden:NO];
    [self.ContentLabel3 setHidden:YES];

    //联系人
    [self.ContentLabel setFont:[UIFont systemFontOfSize:15]];
    [self.ContentLabel setTextColor:kColor_1];



    [self.ContentLabel sizeToFit];
    [self.ContentLabel mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.top.equalTo(self.contentView).mas_offset(15);
        make.width.mas_greaterThanOrEqualTo(0);
    }];

    //联系人电话
    [self.ContentLabel1 sizeToFit];
    [self.ContentLabel1 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.ContentLabel.mas_right).mas_offset(50);
        make.centerY.equalTo(self.ContentLabel);
    }];

    //虚线
    [self.lineView mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.right.equalTo(self.ContentBtn1.mas_left).mas_offset(0);
        make.top.equalTo(self.contentView).mas_offset(15);
        make.bottom.equalTo(self.ContentLabel2.mas_bottom);
        make.width.mas_equalTo(0.5);
    }];

    //编辑
//    [self.ContentBtn1 sizeToFit];
    [self.ContentBtn1 setImage:[UIImage imageWithContentsOfFile:SEGPicName(@"icon_order_list_edit")] forState:UIControlStateNormal];
    [self.ContentBtn1 setTitle:@"" forState:UIControlStateNormal];
    [self.ContentBtn1 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.right.equalTo(self.contentView).mas_offset(0);
        make.centerY.equalTo(self.contentView);
        make.width.mas_equalTo(36);
        make.height.mas_equalTo(36);
    }];

    //联系人地址
    [self.ContentLabel2 sizeToFit];
    [self.ContentLabel2 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.leading.equalTo(self.contentView).mas_offset(15);
        make.right.equalTo(self.lineView.mas_left).mas_offset(-15);
        make.top.equalTo(self.ContentLabel.mas_bottom).mas_offset(15).priorityHigh();
        // iOS10 以上的适配
        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0) {
            make.bottom.equalTo(self.contentView).mas_offset(-15);
        }
    }];

    [self.contentView mas_remakeConstraints:^(MASConstraintMaker* make) {
        // iOS10 以上的适配
        if ([[[UIDevice currentDevice] systemVersion] floatValue] < 10.0) {
            make.left.top.right.equalTo(self);
            make.bottom.equalTo(self.ContentLabel2.mas_bottom).mas_offset(15);
        }else{
            make.edges.equalTo(self);
        }
        
    }];
}

- (void)remakeConstrants_Order_Normal
{

    [self.ContentBtn setHidden:YES];
    [self.ContentBtn2 setHidden:YES];

    [self.ContentLabel setHidden:NO];
    [self.ContentLabel1 setHidden:NO];
    [self.ContentLabel2 setHidden:NO];
    [self.lineView setHidden:NO];
    [self.ContentBtn1 setHidden:NO];
    [self.ContentLabel3 setHidden:NO];

    //联系人
    [self.ContentLabel setFont:[UIFont systemFontOfSize:15]];
    [self.ContentLabel setTextColor:kColor_1];



    [self.ContentLabel sizeToFit];
    [self.ContentLabel mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.top.equalTo(self.contentView).mas_offset(15);
        make.width.mas_greaterThanOrEqualTo(0);
    }];

    //联系人电话
    [self.ContentLabel1 sizeToFit];
    [self.ContentLabel1 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.centerY.equalTo(self.ContentLabel);
        make.left.lessThanOrEqualTo(self.ContentLabel.mas_right).mas_offset(50).priorityLow();
        make.right.lessThanOrEqualTo(self.lineView.mas_left).mas_offset(-15).priorityHigh();
    }];

    //虚线
    [self.lineView mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.right.equalTo(self.ContentBtn1.mas_left).mas_offset(0);
        make.top.equalTo(self.contentView).mas_offset(15);
        make.bottom.equalTo(self.ContentLabel2.mas_bottom);
        make.width.mas_equalTo(0.5);
    }];

    //编辑
//    [self.ContentBtn1 sizeToFit];
    [self.ContentBtn1 setImage:[UIImage imageWithContentsOfFile:SEGPicName(@"icon_order_list_edit")] forState:UIControlStateNormal];
    [self.ContentBtn1 setTitle:@"" forState:UIControlStateNormal];
    [self.ContentBtn1 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.right.equalTo(self.contentView).mas_offset(0);
        make.centerY.equalTo(self.contentView);
        make.width.mas_equalTo(36);
        make.height.mas_equalTo(36);
    }];

    //默认
    [self.ContentLabel3 sizeToFit];
    [self.ContentLabel3 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.contentView).mas_offset(15);
        make.top.equalTo(self.ContentLabel.mas_bottom).mas_offset(15);
        make.width.mas_equalTo(self.ContentLabel3.bounds.size.width);
    }];

    //联系人地址
    [self.ContentLabel2 sizeToFit];
    [self.ContentLabel2 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.ContentLabel3.mas_right).mas_offset(10);
        make.right.equalTo(self.lineView.mas_left).mas_offset(-15);
        make.top.equalTo(self.ContentLabel.mas_bottom).mas_offset(15).priorityHigh();
        // iOS10 以上的适配
        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0) {
            make.bottom.equalTo(self.contentView).mas_offset(-15);
        }
    }];

    [self.contentView mas_remakeConstraints:^(MASConstraintMaker* make) {
        // iOS10 以上的适配
        if ([[[UIDevice currentDevice] systemVersion] floatValue] < 10.0) {
            make.left.top.right.equalTo(self);
            make.bottom.equalTo(self.ContentLabel2.mas_bottom).mas_offset(15);
        }else{
            make.edges.equalTo(self);
        }
        
    }];
}

- (void)remakeConstrants_Order_Selected
{

    [self.ContentBtn setTitle:nil forState:UIControlStateNormal];
    [self.ContentBtn setHidden:NO];
    [self.ContentLabel setHidden:NO];

    [self.ContentBtn2 setHidden:YES];
    [self.ContentLabel1 setHidden:NO];
    [self.lineView setHidden:NO];
    [self.ContentBtn1 setHidden:NO];
    [self.ContentLabel3 setHidden:YES];
    [self.ContentLabel2 setHidden:NO];

    //选择框
    [self.ContentBtn sizeToFit];
    [self.ContentBtn mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.contentView).mas_offset(15);
        make.top.equalTo(self.ContentLabel.mas_bottom).mas_offset(15);
        make.width.mas_equalTo(self.ContentBtn.bounds.size.width);
    }];

    //联系人
    [self.ContentLabel setFont:[UIFont systemFontOfSize:15]];
    [self.ContentLabel setTextColor:kColor_1];



    [self.ContentLabel sizeToFit];
    [self.ContentLabel mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.ContentBtn.mas_right).mas_offset(15);
        make.top.equalTo(self.contentView).mas_offset(15);
        make.width.mas_greaterThanOrEqualTo(0);
    }];

    //联系人电话
    [self.ContentLabel1 sizeToFit];
    [self.ContentLabel1 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.centerY.equalTo(self.ContentLabel);
        make.left.lessThanOrEqualTo(self.ContentLabel.mas_right).mas_offset(50).priorityLow();
        make.right.lessThanOrEqualTo(self.lineView.mas_left).mas_offset(-15).priorityHigh();
    }];

    //虚线
    [self.lineView mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.right.equalTo(self.ContentBtn1.mas_left).mas_offset(0);
        make.top.equalTo(self.contentView).mas_offset(15);
        make.bottom.equalTo(self.ContentLabel2.mas_bottom);
        make.width.mas_equalTo(0.5);
    }];

    //编辑
//    [self.ContentBtn1 sizeToFit];
    [self.ContentBtn1 setImage:[UIImage imageWithContentsOfFile:SEGPicName(@"icon_order_list_edit")] forState:UIControlStateNormal];
    [self.ContentBtn1 setTitle:@"" forState:UIControlStateNormal];
    [self.ContentBtn1 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.right.equalTo(self.contentView).mas_offset(0);
        make.centerY.equalTo(self.contentView);
        make.width.mas_equalTo(36);
        make.height.mas_equalTo(36);
    }];

    //联系人地址
    [self.ContentLabel2 sizeToFit];
    [self.ContentLabel2 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.ContentBtn.mas_right).mas_offset(15);
        make.right.equalTo(self.lineView.mas_left).mas_offset(-15);
        make.top.equalTo(self.ContentLabel.mas_bottom).mas_offset(15).priorityHigh();
        // iOS10 以上的适配
        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0) {
            make.bottom.equalTo(self.contentView).mas_offset(-15);
        }
    }];
//SAM:iOS10兼容-cell
    [self.contentView mas_remakeConstraints:^(MASConstraintMaker* make) {
        // iOS10 以上的适配
        if ([[[UIDevice currentDevice] systemVersion] floatValue] < 10.0) {
            make.left.top.right.equalTo(self);
            make.bottom.equalTo(self.ContentLabel2.mas_bottom).mas_offset(15);
        }else{
            make.edges.equalTo(self);
        }
       
    }];
}


- (void)remakeConstrants_Order_SelectedNomal
{

    [self.ContentBtn setTitle:nil forState:UIControlStateNormal];
    [self.ContentBtn setHidden:NO];
    [self.ContentLabel setHidden:NO];

    [self.ContentBtn2 setHidden:YES];
    [self.ContentLabel1 setHidden:NO];
    [self.lineView setHidden:NO];
    [self.ContentBtn1 setHidden:NO];
    [self.ContentLabel3 setHidden:NO];
    [self.ContentLabel2 setHidden:NO];

    //选择框
    [self.ContentBtn sizeToFit];
    [self.ContentBtn mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.contentView).mas_offset(15);
        make.top.equalTo(self.ContentLabel.mas_bottom).mas_offset(15);
        make.width.mas_equalTo(self.ContentBtn.bounds.size.width);
    }];

    //联系人
    [self.ContentLabel setFont:[UIFont systemFontOfSize:15]];
    [self.ContentLabel setTextColor:kColor_1];



    [self.ContentLabel sizeToFit];
    [self.ContentLabel mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.ContentBtn.mas_right).mas_offset(15);
        make.top.equalTo(self.contentView).mas_offset(15);
        make.width.mas_greaterThanOrEqualTo(0);
    }];

    //联系人电话
    [self.ContentLabel1 sizeToFit];
    [self.ContentLabel1 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.centerY.equalTo(self.ContentLabel);
        make.left.lessThanOrEqualTo(self.ContentLabel.mas_right).mas_offset(50).priorityLow();
        make.right.lessThanOrEqualTo(self.lineView.mas_left).mas_offset(-15).priorityHigh();
    }];

    //虚线
    [self.lineView mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.right.equalTo(self.ContentBtn1.mas_left).mas_offset(0);
        make.top.equalTo(self.contentView).mas_offset(15);
        make.bottom.equalTo(self.ContentLabel2.mas_bottom);
        make.width.mas_equalTo(0.5);
    }];

    //编辑
//    [self.ContentBtn1 sizeToFit];
    [self.ContentBtn1 setImage:[UIImage imageWithContentsOfFile:SEGPicName(@"icon_order_list_edit")] forState:UIControlStateNormal];
    [self.ContentBtn1 setTitle:@"" forState:UIControlStateNormal];
    [self.ContentBtn1 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.right.equalTo(self.contentView).mas_offset(0);
        make.centerY.equalTo(self.contentView);
        make.width.mas_equalTo(36);
        make.height.mas_equalTo(36);
    }];

    //默认
    [self.ContentLabel3 sizeToFit];
    [self.ContentLabel3 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.ContentBtn.mas_right).mas_offset(15);
        make.top.equalTo(self.ContentLabel.mas_bottom).mas_offset(15);
        make.width.mas_equalTo(self.ContentLabel3.bounds.size.width);
    }];

    //联系人地址
    [self.ContentLabel2 sizeToFit];
    [self.ContentLabel2 mas_remakeConstraints:^(MASConstraintMaker* make) {
        make.left.equalTo(self.ContentLabel3.mas_right).mas_offset(10);
        make.right.equalTo(self.lineView.mas_left).mas_offset(-15);
        make.top.equalTo(self.ContentLabel.mas_bottom).mas_offset(15).priorityHigh();
        // iOS10 以上的适配
        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0) {
            make.bottom.equalTo(self.contentView).mas_offset(-15);
        }
    }];

    [self.contentView mas_remakeConstraints:^(MASConstraintMaker* make) {
        // iOS10 以上的适配
        if ([[[UIDevice currentDevice] systemVersion] floatValue] < 10.0) {
            make.left.top.right.equalTo(self);
            make.bottom.equalTo(self.ContentLabel2.mas_bottom).mas_offset(15);
        }else{
            make.edges.equalTo(self);
        }
        
    }];
}

#pragma mark - getter
- (UILabel*)ContentLabel
{
    if (!_ContentLabel) {
        _ContentLabel = [[UILabel alloc] init];
    }
    return _ContentLabel;
}

- (UILabel*)ContentLabel1
{
    if (!_ContentLabel1) {
        _ContentLabel1 = [[UILabel alloc] init];
    }
    return _ContentLabel1;
}

- (UILabel*)ContentLabel2
{
    if (!_ContentLabel2) {
        _ContentLabel2 = [[UILabel alloc] init];
    }
    return _ContentLabel2;
}

- (UILabel*)ContentLabel3
{
    if (!_ContentLabel3) {
        _ContentLabel3 = [[UILabel alloc] init];
    }
    return _ContentLabel3;
}

- (UIButton*)ContentBtn
{
    if (!_ContentBtn) {
        _ContentBtn = [[UIButton alloc] init];
    }
    return _ContentBtn;
}

- (UIButton*)ContentBtn1
{
    if (!_ContentBtn1) {
        _ContentBtn1 = [[UIButton alloc] init];
    }
    return _ContentBtn1;
}

- (UIButton*)ContentBtn2
{
    if (!_ContentBtn2) {
        _ContentBtn2 = [[UIButton alloc] init];
    }
    return _ContentBtn2;
}

- (UIView*)lineView
{
    if (!_lineView) {
        _lineView = [[UIView alloc] init];
        _lineView.backgroundColor = kColor_L2;
    }
    return _lineView;
}

- (NSIndexPath*)indexPath
{
    if (!_indexPath) {
        _indexPath = [[NSIndexPath alloc] init];
    }
    return _indexPath;
}
@end
